pragma circom 2.0.0;

include "bitify.circom";

template SubCircuit(n) {
    signal input a;
    signal input b;
    signal output out;
    
    // 确保输入在合理范围内
    component range_check_a = Num2Bits(n);
    component range_check_b = Num2Bits(n);
    range_check_a.in <== a;
    range_check_b.in <== b;
    
    out <== a - b;
} 